package com.healthcloud.dao.RegionalDisease;


import com.healthcloud.dao.BaseDao;
import com.healthcloud.entity.RegionalDisease.TestprojectitemmonitorEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 个人测量监测
 *
 * @author yucl
 * @email yucailong1111@126.com
 * @date 2017-11-14 08:56:56
 */
public interface TestprojectitemmonitorDao extends BaseDao<TestprojectitemmonitorEntity> {

    TestprojectitemmonitorEntity queryByTestItemCode(@Param("testItemCode") String testItemCode, @Param("idcard") String idcard);

    int queryCount(@Param("testItemcode") String testItemcode, @Param("year") String year, @Param("list") List<Long> list);

    List<TestprojectitemmonitorEntity> queryMsgByTestItemCode(@Param("testItemcode") String testItemcode,
                                                              @Param("year") String year,
                                                              @Param("list") List<Long> list);

    List<TestprojectitemmonitorEntity> queryByItemCode(@Param("testItemcode") String testItemcode);

    String queryHospIdByIdcard(@Param("idcard") String idcard);

    int queryPoct(@Param("testKindCode") String testKindCode);

    int queryPoctByYear(@Param("year") String year, @Param("testKindCode") String testKindCode, @Param("hospList") List<Long> hospList);

    int queryCountByHospid(@Param("list") List<Long> list, @Param("year") String year);

    List<TestprojectitemmonitorEntity> queryByYear(@Param("testItemcode") String testItemcode, @Param("year") String year, @Param("hospId") String hospId);

    int queryCountByYear(@Param("testItemcode") String testItemcode, @Param("year") String year);

    Integer countTotal(@Param("testItemName") String testItemName);

    Integer countTotalByYear(@Param("testItemName") String testItemName, @Param("year") String year, @Param("list") List<Long> list);

    /**
     * 修改病人身份证号
     * @param oldIdCard 修改前身份证号
     * @param newIdCard 修改后身份证号
     */
    void updateIdCard(@Param("newIdCard") String newIdCard, @Param("oldIdCard") String oldIdCard);
}
